package cn.sc.summer.core.spring.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation used to mark a spring bean async init. Sample usage:
 *
 * <pre>
 *
 *     &#064;Bean(value = "test", initMethod = "init")
 *     &#064;SofaAsyncInit
 *     public Test test() {
 *         return new Test();
 *     }
 *
 *     &#064;Slf4j
 *     public class Test {
 *          public void init() {
 *              log.error("test init");
 *          }
 *      }
 * </pre>
 *
 * @author a-xin
 * @version SofaAsyncInit.java, v 0.1 2022年03月25日 11:52 AM a-xin Exp $
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
public @interface SofaAsyncInit {

    /**
     * Whether init-method async invoke should occur.
     */
    boolean value() default true;

}
